home *** CD-ROM | disk | FTP | other *** search
/ Headbone Interactive / Headbone_Interactive_CD-ROM_Sampler_1995.iso / pc / demos / abf / pnp / shared.dxr / 00550_shared global handlers.ls next >
Encoding:
Text File  |  1995-09-15  |  2.2 KB  |  85 lines

  1. on ExitSound
  2.   global gvFadeSndOnExit, SFX_EXT
  3.   puppetSound(0)
  4.   puppetSound("toodleoo" & SFX_EXT)
  5.   updateStage()
  6.   sound fadeOut 1, gvFadeSndOnExit
  7.   sound fadeOut 2, gvFadeSndOnExit
  8.   wait(gvFadeSndOnExit)
  9. end
  10.  
  11. on SndClrReset
  12.   global gvOldSndLevM, gvOldClrDpth, IBM
  13.   set the soundLevel to gvOldSndLevM
  14.   if the machineType <> IBM then
  15.     set the colorDepth to gvOldClrDpth
  16.     if objectp(gRearWindow) then
  17.       gRearWindow(mdispose)
  18.     end if
  19.   else
  20.     nothing()
  21.   end if
  22. end
  23.  
  24. on checkKeyForQuit
  25.   global gvfRealQuit, IBM
  26.   if the machineType <> IBM then
  27.     if the commandDown then
  28.       if (the key = "q") or (the key = "Q") or (the key = ".") then
  29.         set gvfRealQuit to 1
  30.         ExitSound()
  31.         SndClrReset()
  32.         quit()
  33.       end if
  34.     end if
  35.   else
  36.     if the controlDown then
  37.       if (the key = "x") or (the key = "q") or (the key = ".") then
  38.         set gvfRealQuit to 1
  39.         ExitSound()
  40.         SndClrReset()
  41.         quit()
  42.       end if
  43.     end if
  44.   end if
  45. end
  46.  
  47. on wait vTicks
  48.   set vStartTime to the timer
  49.   repeat while the timer < (vStartTime + vTicks)
  50.   end repeat
  51. end
  52.  
  53. on ResetGlobals
  54.   global IBM, SFX_EXT, DIR_SYM, MOV_EXT, gvOldSndLevM, gvOldClrDpth, gvVolume, gvMonitorDepth, gvfRealQuit, gvFadeSndOnExit, gvCDHomePath, gvQuoteWait, gvSelectWait, gvfReturnToMain, gvQuitSong
  55.   set vIBM to IBM
  56.   set vSFX_EXT to SFX_EXT
  57.   set vDIR_SYM to DIR_SYM
  58.   set vMOV_EXT to MOV_EXT
  59.   set vOldSndLevM to gvOldSndLevM
  60.   set vOldClrDpth to gvOldClrDpth
  61.   set vVolume to gvVolume
  62.   set vfRealQuit to gvfRealQuit
  63.   set vFadeSndOnExit to gvFadeSndOnExit
  64.   set vCDHomePath to gvCDHomePath
  65.   set vQuoteWait to gvQuoteWait
  66.   set vSelectWait to gvSelectWait
  67.   set vfReturnToMain to gvfReturnToMain
  68.   set vQuitSong to gvQuitSong
  69.   clearGlobals()
  70.   set IBM to vIBM
  71.   set SFX_EXT to vSFX_EXT
  72.   set DIR_SYM to vDIR_SYM
  73.   set MOV_EXT to vMOV_EXT
  74.   set gvOldClrDpth to vOldClrDpth
  75.   set gvOldSndLevM to vOldSndLevM
  76.   set gvVolume to vVolume
  77.   set gvfRealQuit to vfRealQuit
  78.   set gvFadeSndOnExit to vFadeSndOnExit
  79.   set gvCDHomePath to vCDHomePath
  80.   set gvQuoteWait to vQuoteWait
  81.   set gvSelectWait to vSelectWait
  82.   set gvfReturnToMain to vfReturnToMain
  83.   set gvQuitSong to vQuitSong
  84. end
  85.